package demo1;

import org.springframework.stereotype.Component;

@Component//只有被@Component注解的类才接受spring容器管理
public class User {
    public void sayHello(){
        System.out.println("user:hello");
    }
}
